<title>链接设置</title>

<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>SEO设置</cite></a>
        <a><cite>链接设置</cite></a>
    </div>
</div>
<style>
    .layui-form-label{
        width: 140px !important;
    }
    .layui-input-block{
        margin-left: 170px !important;;
    }
</style>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12" id="tkdView">
            <form class="layui-form" wid100 lay-filter="LAY-info-form">
                <div class="layui-card">
                    <blockquote class="layui-elem-quote layui-bg-orange">
                        {novelid}后面不允许跟下划线“_”,否则会有冲突<br />
                        如果设置不好，请联系联系我们，我们为您进行配置,<a href="http://www.ptcms.com/manual/doc_79.html" target="_blank">参考文档</a>
                    </blockquote>
                </div>
                <div class="body">

                </div>
                <div class="layui-card">
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <label class="layui-form-label">
                                <button class="layui-btn mb" lay-submit lay-filter="submit">确认修改</button>
                            </label>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script id="tkdTpl" type="text/html">
    {{#  layui.each(d, function(index, items){ }}
    <div class="layui-card">
        <div class="layui-card-header">{{index}}</div>
        <div class="layui-card-body" pad15>
            {{#  layui.each(items, function(i, item){ }}
            <div class="layui-form-item">
                <label class="layui-form-label">{{item.name}}</label>
                <div class="layui-input-block">
                    <input type="text" name="{{item.key}}" value="" class="layui-input">
                    {{# if(item.intro){ }}
                    <div class="layui-form-mid layui-word-aux">{{item.intro}}</div>
                    {{# } }}
                </div>
            </div>
            {{#  }); }}
        </div>
    </div>
    {{#  }); }}
</script>
<script>
    layui.define(['form', 'upload'], function (exports) {
        var $ = layui.$
            , layer = layui.layer
            , laytpl = layui.laytpl
            , admin = layui.admin
            , form = layui.form;

        var $body = $('body');

        form.render();

        admin.req({
            url: '/manage/setting/url.json',
            success: function (res) {
                laytpl(tkdTpl.innerHTML).render(res.data.fields, function (html) {
                    $body.find('#tkdView .body').html(html);
                });
                form.val('LAY-info-form', res.data.values);
            }
        });

        form.on('submit(submit)', function (obj) {
            admin.req({
                url: '/manage/setting/url.json',
                data: obj.field,
                method: 'POST',
                success: function (res) {
                    layer.open({
                        icon: 1,
                        title: '操作成功',
                        content: '修改成功',
                    });
                }
            });
            return false;
        });
    });
</script>